<?php
class frm_addlicense{
	private $args;
	function __construct($arg){
		$this->args = $arg;
	}
	function getPublish(){
		$ptn = readPattern($_SESSION[ "service_dir" ]  .'/pattern/' .'ptn_'. "frm_addlicense" .'.php' );
		$ptn_option = readPattern($_SESSION[ "service_dir" ]  .'/pattern/' .'ptn_'. "detail_option" .'.php' );
		$area_manager = FunctionData::readAreasManager();
		$system_areas = $area_manager->getListSystemAreas();
		if(is_array($system_areas) && count($system_areas) > 0){
			foreach ($system_areas as $area){
				$ptn_option->value = $area;
				$ptn_option->title = $area;
				$ptn->list_areas .=  $ptn_option ->publish() ;
			}
		}
		$group_manager = FunctionData::readGroupsManager();
		$system_groups = $group_manager->getSystemGroups();
		if(is_array($system_groups) && count($system_groups) > 0){
			foreach ($system_groups as $group){
				$ptn_option->value = $group;
				$ptn_option->title = $group;
				$ptn->list_groups .=  $ptn_option ->publish() ;
			}			
		}
		for($i = (-1) ;$i<= (9) ;$i++){
			$ptn_option->value = $i;
			$ptn_option->title = $i;
			$ptn->list_role_level .=  $ptn_option ->publish() ;
		}
		return  $ptn ->publish() ;
	}
}
?>